/*
 * QE3e Qt Quick 3D Engine.
 * Copyright (C) 2010 Joris Vaillant and Mathieu Pujol 
 * <joris.vaillant@gmail.com>  <mathieu.pujol87@gmail.com>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */


#ifndef ITEMFXMANAGER_H
#define ITEMFXMANAGER_H

//QE3E
#include "ItemFx.h"

//Qt
#include <QHash>

namespace qe3e
{
  
  class QE3E_EXPORT ItemFxManager
  {
  public:
    static const ITEM_FX_ID mMaxReservedId;
    static const ITEM_FX_ID mMaxIdValue;
    static ItemFxManager * getInstance();
    static bool isValidId(ITEM_FX_ID id);

    bool isUsed(ITEM_FX_ID id) const;
    bool registerItemFx(ItemFx * item);
    ItemFx * unregister(ITEM_FX_ID id);
   // ItemFx * getItemFx(ITEM_FX_ID id) const;
    ITEM_FX_ID getValidId() const;

    QList<ItemFx *> getItemFx(ITEM_FX_ID itemFxIdMask) const;

  private:
    ItemFxManager();
    ~ItemFxManager();

    static ItemFxManager * mInstance;
    QHash<ITEM_FX_ID,ItemFx *> mItemFxHash;
  };
}
#endif // ITEMFXMANAGER_H
